home *** CD-ROM | disk | FTP | other *** search
/ SGI Hot Mix 17 / Hot Mix 17.iso / HM17_SGI / research / lib / obsolete / phaser.pro < prev    next >
Text File  |  1997-07-08  |  3KB  |  92 lines

  1. ; $Id: phaser.pro,v 1.1 1993/04/02 19:43:31 idl Exp $
  2.  
  3. pro phaser, legal=legal, letter=letter, $
  4.             landscape=landscape, portrait=portrait
  5.  
  6. ;+
  7. ; NAME:
  8. ;    PHASER
  9. ;
  10. ; PURPOSE:
  11. ;    Issue the SET_PLOT and DEVICE commands appropriate for the Tektronix
  12. ;    Phaser IIpxi color PostScript laser printer.
  13. ;
  14. ; CATEGORY:
  15. ;    Device drivers.
  16. ;
  17. ; CALLING SEQUENCE:
  18. ;    PHASER [, /LETTER] [, /LEGAL] [, /LANDSCAPE] [, /PORTRAIT]
  19. ;
  20. ; INPUTS:
  21. ;    None.
  22. ;
  23. ; KEYWORD PARAMETERS:
  24. ;      LETTER:    If this keyword is set, output is produced for letter-sized 
  25. ;        paper.  This setting is the default.
  26. ;
  27. ;       LEGAL:    If this keyword is set, output is produced for legal-sized
  28. ;        papter.  /LEGAL should be used for overhead transparencies as 
  29. ;        well, since these are legal size before the borders are 
  30. ;        removed.
  31. ;
  32. ;   LANDSCAPE:    If this keyword is set, output is produced in landscape 
  33. ;        orientation, i.e. with the X axis along the long edge of the 
  34. ;        page.  This setting is the default.
  35. ;
  36. ;    PORTRAIT:    If this keyword is set, output is produced in portrait 
  37. ;        orientation, i.e. wih the X axis  along the short edge of the 
  38. ;        paper.
  39. ;
  40. ; OUTPUTS:
  41. ;    None.
  42. ;
  43. ; COMMON BLOCKS:
  44. ;    None.
  45. ;
  46. ; SIDE EFFECTS:
  47. ;    The plotting device is set to PostScript, 8 bits/pixel, color and with
  48. ;    sizes, offsets and orientations appropriate to the keywords used.
  49. ;
  50. ; RESTRICTIONS:
  51. ;    Because of the paper handling mechanism in the Phaser printer it is
  52. ;    unable to print over the entire page.  The actual print dimensions
  53. ;    are 8.0" x 8.5" for /LETTER and 8.0" x 10.5" for /LEGAL.
  54. ;
  55. ; PROCEDURE:
  56. ;    The SET_PLOT, 'PS' command is issued. 
  57. ;    Then PHASER issues a command like:
  58. ;
  59. ;    DEVICE, BITS=8, /COLOR, XSIZE=SHORT_SIDE, YSIZE=LONG_SIDE, $
  60. ;        XOFFSET = SMALL_OFFSET, YOFFSET = BIG_OFFSET, $
  61. ;        /INCH, /PORTRAIT, [/LANDSCAPE or /PORTRAIT]
  62. ;
  63. ;    The values of SHORT_SIDE, LONG_SIDE, SMALL_OFFSET, BIG_OFFSET are
  64. ;    calculated for the paper size (/LETTER or /LEGAL) and orientation
  65. ;    (/LANDSCAPE or /PORTRAIT).
  66. ;
  67. ; MODIFICATION HISTORY:
  68. ;    Created 22-OCT-1991 by Mark Rivers.
  69. ;-
  70.  
  71. short_side = 8.0
  72. small_offset=(8.5-short_side)/2.
  73. set_plot, 'ps'
  74. if n_elements(legal) ne 0 then begin
  75.   long_side=10.5
  76.   big_offset=(14.-long_side)/2.
  77. endif else begin
  78.   long_side=8.5
  79.   big_offset=(11.-long_side)/2.
  80. endelse
  81. if n_elements(portrait) ne 0 then begin
  82.   device, bits=8, /color, xsize=short_side, ysize=long_side, $
  83.          xoffset=small_offset, yoffset=big_offset, $
  84.          /inch, /portrait
  85. endif else begin
  86.   device, bits=8, /color, xsize=long_side, ysize=short_side, $
  87.          xoffset=small_offset, yoffset=long_side+big_offset, $
  88.          /inch, /landscape
  89. endelse
  90.  
  91. end
  92.